LBOUND Function ---------------------------------------------------------------------------- Action Returns the lower bound (smallest available subscript) for the indicated dimension of an array. Syntax LBOUND( array , dimension% ) Remarks The LBOUND function is used with the UBOUND function to determine the size of an array. LBOUND takes the following arguments. ----------------------------------------------------------------------------- Argument Description ---------------------------------------------------------------------------- array The name of the array variable to be tested. Argument Description ---------------------------------------------------------------------------- dimension% An integer ranging from 1 to the number of dimensions in array; indicates which dimension's lower bound is returned. Use 1 for the first dimension, 2 for the second dimension, and so on. This argument is optional for one-dimensional arrays. LBOUND returns the values listed below for an array with the following dimensions. DIM A(1 TO 100, 0 TO 3, -3 TO 4) ----------------------------------------------------------------------------- Invocation Value returned ---------------------------------------------------------------------------- LBOUND(A,1) 1 LBOUND(A,2) 0 LBOUND(A,3) -3 The default lower bound for any dimension is either 0 or 1, depending on the setting of the OPTION BASE statement. If OPTION BASE is 0, the default lower bound is 0, and if OPTION BASE is 1, the default lower bound is 1. Arrays dimensioned using the TO clause in the DIM statement can have any integer value as a lower bound. You can use the shortened syntax LBOUND( array) for one-dimensional arrays, because the default value for dimension% is 1. Use the UBOUND function to find the upper limit of an array dimension. See Also DIM, OPTION BASE, UBOUND Example See the UBOUND function programming example, which uses the LBOUND function.